<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>工作日及工作时间设置</title>

<!-- 引入基础的Ext的JS和CSS文件-->
<%@ include file="/common/meta_ext.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/common/system/public/js/wizard/ext-ux-wiz.css" />

<!-- 引入所需的扩展组件 -->
<script src="${ctx}/common/system/public/js/wizard/Wizard.js" type="text/javascript"></script>
<script src="${ctx}/common/system/public/js/wizard/Header.js" type="text/javascript"></script>
<script src="${ctx}/common/system/public/js/wizard/Card.js" type="text/javascript"></script>

<script src="${ctx}/resources/js/aos/ext_ux/BasicGrid.js" type="text/javascript"></script>

<script src="${ctx}/common/workdayholiday/WorkDaySetPanel.js" type="text/javascript"></script>
<script src="${ctx}/common/workdayholiday/WorkTimeSetPanel.js" type="text/javascript"></script>
<script src="${ctx}/common/workdayholiday/TimeCombox.js" type="text/javascript"></script>
<script src="${ctx}/common/workdayholiday/RegularWorkTimeSetWizard.js" type="text/javascript"></script>

<script type="text/javascript">

/**
 * 工作日或工作时间显示
 **/
Ext.onReady(function(){
	Ext.QuickTips.init();
	
	var gridStructure = [{  
		name: 'id',
		hidden: true
	},{
		name: 'workdayDesc',  
		header: '工作日',
		width: 120
	},{  
		name: 'amStartTime',  
		header: '上午起始时间',
		width: 80
	},{  
		name: 'amEndTime',  
		header: '上午结束时间',
		width: 80
	},{  
		name: 'pmStartTime',  
		header: '下午起始时间',
		width: 80
	},{  
		name: 'pmEndTime',  
		header: '下午起始时间',
		width: 80
	},{  
		name: 'memo',  
		header: '备注',
		width: 120
	}];
   
    //常规工作时间列表
	var grid = new Ext.ux.grid.BasicGrid({
		id: 'regularWorkTimeGrid',
		structure: gridStructure,
		url: '${ctx}/workdayholiday/wh-regular-work-time!list.action',
		defaultSortField: 'workday',  
		keyField: 'id',
		title: '常规工作时间管理',
		region: 'center',
		margins: "1 1 1 1",
		tbar: ['-',{
			iconCls: 'icon-edit',
			text: '常规工作时间设置向导',
			tooltip: '设置常规工作日及工作时间段',
			handler: function(){
				var wizard = new Ext.ux.workholiday.RegularWorkTimeSetWizard();
				wizard.show();
			}
		}]
	});

	var viewPort = new Ext.Viewport({
		layout: 'border',
		items: [grid]
	});
});
</script>
</head>
<body>
</body>
</html>